package com.you.open.api.demo.service.biz.impl;

import com.you.open.api.demo.service.biz.IUserBizService;
import com.yough.api.framework.core.message.IMessageHandler;
import com.yough.api.framework.core.message.process.XmlMessageHandler;
import org.dom4j.Element;
import org.springframework.stereotype.Service;

import java.util.Iterator;

/**
 * @Description
 * @Author yough
 * @Version V1.0.0
 * @Since 1.0
 * @Date 2021/1/18
 */
@Service
public class UserBizServiceImpl implements IUserBizService {

    String repsonseXml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
            "<Service>\n" +
            "\t<Service_Header>\n" +
            "\t\t<msg_interval>30</msg_interval>\n" +
            "\t\t<msg_expiry>36000</msg_expiry>\n" +
            "\t\t<timeout>60</timeout>\n" +
            "\t\t<service_sn>1000026000109020407</service_sn>\n" +
            "\t\t<trans_sn>1000026000109020308</trans_sn>\n" +
            "\t\t<biz_code>00000000008427</biz_code>\n" +
            "\t\t<service_time>20211212031624</service_time>\n" +
            "\t\t<service_id>00270030Epp002</service_id>\n" +
            "\t</Service_Header>\n" +
            "\t<Service_Body>\n" +
            "\t\t<ext_attributes>\n" +
            "\t\t\t<node_type>100</node_type>\n" +
            "\t\t\t<TX-TYPE>101</TX-TYPE>\n" +
            "\t\t\t<TX-MODE>8</TX-MODE>\n" +
            "\t\t</ext_attributes>\n" +
            "\t\t<request/>\n" +
            "\t\t<response>\n" +
            "\t\t\t<userId>370101199009011187</userId>\n" +
            "\t\t\t<age>30</age>\n" +
            "\t\t\t<userName>张三</userName>\n" +
            "\t\t\t<birthDay>20210118</birthDay>\n" +
            "\t\t</response>\n" +
            "\t</Service_Body>\n" +
            "</Service>";

    @Override
    public String requestBiz(String requestXml) {
        return repsonseXml;
    }
}
